package com.bwie.bargain.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.common.utils.PageUtils;
import com.bwie.common.utils.Query;

import com.bwie.bargain.dao.NotesDao;
import com.bwie.bargain.entity.NotesEntity;
import com.bwie.bargain.service.NotesService;


@Service("notesService")
public class NotesServiceImpl extends ServiceImpl<NotesDao, NotesEntity> implements NotesService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<NotesEntity> page = this.page(
                new Query<NotesEntity>().getPage(params),
                new QueryWrapper<NotesEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public int findCount(Long userId, Long bargainId) {

        return baseMapper.findCount(userId,bargainId);
    }

}